#!/usr/bin/env bash 

#salt "*" test.ping;

minion_id="vm-win7-01"
confPath="C:\\Program Files (x86)\\McpServer\\config.ini"
section="Config"
#minion_id="jxm-pc-windows"
#confPath="C:\\config.ini"
#section="Other"

function test_2()
{
    echo  " 1. get config info"
    salt "$minion_id"  mcpServerConfig_module.get_config_info  "$confPath" "$section"

    echo  " 2. change"
    #salt "$minion_id"  file.set_attributes  "$confPath"  readonly=False  #True
    #salt "$minion_id"  file.stats "$confPath"

    salt "$minion_id"  mcpServerConfig_module.change_config_info  "Model" "test 123 sh" "$confPath" "$section"

    echo  " 3.  add "
    salt "$minion_id"  mcpServerConfig_module.add_config_info  "mmmm" "test 123 sh" "$confPath" "$section"

    echo  " 4. delete "
    salt "$minion_id"  mcpServerConfig_module.del_config_info  "mmmm"  "$confPath"  "$section"

}


function main()
{
    test_2
}

main

